"use strict"

import Ajax from "../libs/ajax";
import Constant from "../libs/constants";

const LivenessSetting = {
    getLiveness() {
        return Ajax.ajax({
            url: Constant.URL_GET_LIVENESS_DETECT,
            method: "get"
        }).then((res) => res.data)
    },
    //{detect:true/false}
    setLiveness(liveness) {
        return Ajax.ajax({
            url: Constant.URL_SET_LIVENESS_DETECT,
            method: "post",
            data: {
                type: 6,
                value: liveness
            }
        }).then(res => res.data)
    }
}

export default LivenessSetting